package br.uece.laconi.tac.fuzzy;

import br.uece.laconi.tac.fuzzy.functions.GenericFunction;

public abstract class FuzzyNumber extends FuzzySet {
	float[] interval = new float[2];
	float step = 0.01f;
	
	protected FuzzyNumber(GenericFunction func) {
		super(func);
	}

	protected void setInterval(float a, float b) {
		interval[0] = a;
		interval[1] = b;
	}
	
	/* Fuzzy Operators */
	
	public CrispFuzzyNumber is(FuzzySet set) {		
		return (new CrispFuzzyNumber(set.membershipDegree(this)));		
	}
	
	/* Math Operators */
	
	public abstract FuzzyNumber plus(FuzzyNumber f);
	public abstract FuzzyNumber minus(FuzzyNumber f);
	public abstract FuzzyNumber times(FuzzyNumber f);
	public abstract FuzzyNumber dividedby(FuzzyNumber f);
	
	/* Logic Operators */
	
	public FuzzyNumber AND(FuzzyNumber num) {
		return and(num);
	}
	
	public FuzzyNumber and(FuzzyNumber num) {
		return FuzzyOperations.and(this, num);
	}
	
	public FuzzyNumber OR(FuzzyNumber num) {
		return or(num);
	}

	public FuzzyNumber or(FuzzyNumber num) {
		return FuzzyOperations.or(this, num);
	}

	

}


